<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui" template="/paginas/template.xhtml">



	<ui:define name="corpoForm">

		<f:event type="javax.faces.event.PreRenderComponentEvent"
			listener="#{manterSmsRecebidaBean.preRenderList}" />
		<h:form id="formListSmsRecebidas" prependId="false">

			<p:panel id="pnlListaSmsRecebidas" header="#{rsc.label_smsRecebidas}"
				toggleable="true" toggleSpeed="500">

				<p:panelGrid columns="1" styleClass="full-width"
					columnClasses="full-width">
					<p:dataTable emptyMessage="#{msg.nenhumRegistroEncontrado}"
						var="smsRecebida" id="listaSmsRecebidas" sortMode="multiple"
						widgetVar="listaSmsRecebidasWid"
						value="#{manterSmsRecebidaBean.entidades}" paginator="true"
						rows="10" paginatorPosition="#{rsc.label_paginationPosition}"
						paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
						rowsPerPageTemplate="10,50,150,200">

						<p:column headerText="#{rsc.label_mensagem}"
							sortBy="#{smsRecebida.nome}">
							<p:outputLabel value="#{smsRecebida.nome}" />
						</p:column>

						<p:column headerText="#{rsc.label_celular}"
							sortBy="#{smsRecebida.celular}">
							<p:outputLabel value="#{smsRecebida.celular}" />
						</p:column>

						<p:column headerText="#{rsc.label_dataEnvio}"
							sortBy="#{smsRecebida.dataEnvio}" style="align: center;">

							<h:outputText value="#{smsRecebida.dataEnvio}">
								<f:convertDateTime pattern="dd/MM/yyyy" />
							</h:outputText>

						</p:column>

						<p:column styleClass="coluna-acoes"
							headerText="#{rsc.label_acoes}">
							
							
							<p:commandButton icon="ui-icon ui-icon-pencil" 
								title="#{rsc.title_responderMensagem}" ajax="false" action="responderSmsRecebida">
								<f:setPropertyActionListener value="#{smsRecebida}"
									target="#{manterSmsRecebidaBean.entidade}" />
							</p:commandButton>
							
							

						</p:column>
					</p:dataTable>
				</p:panelGrid>
			</p:panel>

		</h:form>

	</ui:define>
</ui:composition>

